import django_filters
from .models import UserProfile


class UserProfileFilter(django_filters.rest_framework.FilterSet):
    """
    菜单管理 简单序过滤器
    """

    username = django_filters.CharFilter(lookup_expr="icontains")
    email = django_filters.CharFilter(lookup_expr="icontains")

    class Meta:
        model = UserProfile
        # exclude = ("description", "creator", "modifier")
        fields = ["username", "email", "name"]
